package com.coffee.socketio;


import com.coffee.core.ResponseCode;

/**
 * @author songkui
 * @since 2024/3/16 14:00
 */
public class CoffeeSocketioException extends RuntimeException {
    private ResponseCode state;
    private Integer cmd;

    public CoffeeSocketioException(ResponseCode responseCode) {
        super(responseCode.message());
        this.state = responseCode;
    }

    public CoffeeSocketioException(ResponseCode responseCode, int cmd) {
        super(responseCode.message());
        this.state = responseCode;
        this.cmd = cmd;
    }

    public CoffeeSocketioException(String message) {
        super(message);
    }

    public CoffeeSocketioException(String msgCode, Throwable ex) {
        super(msgCode, ex);
    }

    public ResponseCode getState() {
        return state;
    }


    public Integer getCmd() {
        return cmd;
    }

}
